<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="http://localhost/YouHuoShop/Static/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="http://localhost/YouHuoShop/Static/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="http://localhost/YouHuoShop/Static/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="http://localhost/YouHuoShop/Static/Admin/Flat/img/favicon.ico">
	    <script src="http://localhost/YouHuoShop/Static/Admin/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
	    <script src="http://localhost/YouHuoShop/Static/Admin/js/category.js" type="text/javascript" charset="utf-8"></script>
	    <style type="text/css">
	    	.td1{
	    		width:100px;
	    		text-align: center;
	    	}
	    	.td2{
	    		width:150px;
	    	}
	    	.td3{
	    		width:150px;
	    	}
	    	.td3 .form-control{
	    		width:150px;
	    	}
	    </style>
	</head>
	<body>
		<form action="" method="post">
			<table class="table table-hover">
				<tr class="active">
					<th class="td1" width="50">分类id</th>
					<th class="td2">分类名称</th>
					<th class="td3">排序 
					</th>
					<th class="td4" width="210">操作</th>
				</tr>
				<?php foreach ($cateData as $k=>$c){?>
					<tr>
						<td class="td1"><?php echo $c['cid'];?></td>
						<td class="td2 cate cate<?php echo $c['pid'];?>" cid=<?php echo $c['cid'];?> pid=<?php echo $c['pid'];?>><?php echo $c['_name'];?></td>
						<td class="td3"><input type="text" value="<?php echo $c['sort'];?>" name="<?php echo $c['cid'];?>" class="sort form-control" /></td>
						<td class="td4">
							<a href="<?php echo U('addCate',array('pid'=>$c['cid']));?>" class="btn btn-sm btn-primary">添加子类</a>
							<a href="<?php echo U('editCate',array('cid'=>$c['cid']));?>" class="btn btn-sm btn-warning">编辑</a>
							<a href="<?php echo U('del',array('cid'=>$c['cid']));?>" class="btn btn-sm btn-danger">删除</a>
						</td>
					</tr>
				<?php }?>
			</table>
			<input type="submit" class="btn btn-block btn-lg btn-inverse" value="进行排序"/>
		</form>
	</body>
</html>
